home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group01b.txt / 000168_icon-group-sender_Thu Nov 8 17:05:41 2001.msg < prev    next >
Internet Message Format  |  2002-01-03  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id fA904II06858
  4.     for icon-group-addresses; Thu, 8 Nov 2001 17:04:18 -0700 (MST)
  5. Message-Id: <200111090004.fA904II06858@baskerville.CS.Arizona.EDU>
  6. Date: Thu, 08 Nov 2001 14:23:47 -0700
  7. From: Steve Wampler <swampler@noao.edu>
  8. X-Accept-Language: en
  9. To: Taybin Rutkin <trutkin@physics.clarku.edu>
  10. CC: icon-group@cs.arizona.edu
  11. Subject: Re: mutual evaluation
  12. Errors-To: icon-group-errors@cs.arizona.edu
  13. Status: RO
  14. Content-Length: 1024
  15.  
  16. Taybin Rutkin wrote:
  17. > On Thu, 8 Nov 2001, Steve Wampler wrote:
  18. > > As an aside, it might have been cleaner if I had written:
  19. > >
  20. > >    return 3(f := open(fName), seek(f,0), where(f)-1, close(f))
  21. > >
  22. > > instead of
  23. > >
  24. > >    return 2(f := open(fName), where(seek(f,0))-1, close(f))
  25. > >
  26. > > in the previous message, since the first more clearly shows
  27. > > the steps involved.
  28. > I see.  It's been awhile.  I thought it looked lambda-esque.  I take it
  29. > that it doesn't short circut?  Otherwise, in 2(), it would skip the
  30. > close(f).  Is this correct?
  31. > Taybin
  32.  
  33. Exactly right.  The evaluation itself is equivalent to
  34.  
  35.    (f := open(fName) & (seek(f,0)) & (where(f)-1) & (close(f))
  36.  
  37. *except* that the value of expr0 determines which of the conjoined
  38. expressions' results gets produced, instead of just producing the
  39. result of the last (as the above conjunction sequence does).
  40. Normal Icon goal-directed evaluation applies, of course.
  41.  
  42. --
  43. Steve Wampler-  SOLIS Project, National Solar Observatory
  44. swampler@noao.edu
  45.